package com.ct.deadlockdetetor.controller;

import com.ct.deadlockdetetor.common.controller.BaseController;
import com.ct.deadlockdetetor.common.pojo.TableDataInfo;
import com.ct.deadlockdetetor.domain.wait.dto.ProcessWaitDTO;
import com.ct.deadlockdetetor.service.ProcessWaitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/process/wait")
public class ProcessWaitController extends BaseController {

    @Autowired
    private ProcessWaitService processWaitService;

    /**
     * 查看等待资源列表
     */
    @GetMapping("/list")
    public TableDataInfo list(ProcessWaitDTO processWaitDTO) {
        return getTableDataInfo(processWaitService.list(processWaitDTO));
    }
}
